package firm;

import java.util.Random;
import java.util.concurrent.atomic.AtomicInteger;

public class Repairman extends Thread  {
	//private Koordynator koordynator;
	private Addition_Machine[] addingMachines;
	private Plurar_Machine[] pluringMachines;
	
	public Repairman(Addition_Machine[] addingMachines2, Plurar_Machine[] pluringMachines){
		//this.koordynator = t;
		this.addingMachines = addingMachines2;
		this.pluringMachines = pluringMachines;
	}

	public void run() 
	{
			while(true){
				GlobalData.cTalking.repair(addingMachines, pluringMachines);
				try {
					sleep((int)(GlobalData.REPAIRING));
				} 
				catch (InterruptedException e) {  }

			}	
	}
}
